package model;

import java.io.Serializable;

public class Car implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private LicensePlate licensePlate;
	private CarModel carModel;
	private Driver driver;
	private String image;
	private boolean stolen;
	
	public Car(LicensePlate licensePlate, CarModel carModel, Driver driver, String image, boolean stolen) {
		this.licensePlate = licensePlate;
		this.carModel = carModel;
		this.driver = driver;
		this.image = image;
		this.stolen = stolen;
	}
	
	@Override
	public String toString() {
		String s = this.stolen ? "!" : "";
		return s + this.licensePlate;
	}	

	public LicensePlate getLicensePlate() {
		return licensePlate;
	}

	public void setLicensePlate(LicensePlate licensePlate) {
		this.licensePlate = licensePlate;
	}

	public CarModel getCarModel() {
		return carModel;
	}

	public void setCarModel(CarModel carModel) {
		this.carModel = carModel;
	}

	public Driver getDriver() {
		return driver;
	}

	public void setDriver(Driver driver) {
		this.driver = driver;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public boolean isStolen() {
		return stolen;
	}

	public void setStolen(boolean stolen) {
		this.stolen = stolen;
	}	
}
